{% extends 'default/base.html' %}
{% load business_tag %}
{% block content %}
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-10">
        <h2> 警报列表 | List Arlarm.</h2>
    </div>
    <div class="col-lg-2">
    </div>
</div>

<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="ibox float-e-margins">
            {% include "listOrAdd.html" %}
            <div class="ibox-title">
                <div class="ibox-tools">
                    <a class="collapse-link">
                        <i class="fa fa-chevron-up"></i>
                    </a>
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                        <i class="fa fa-wrench"></i>
                    </a>
                    <ul class="dropdown-menu dropdown-user"></ul>
                    <a class="close-link">
                        <i class="fa fa-times"></i>
                    </a>
                </div>
            </div>

            <div class="ibox-content">
                <table class="table table-striped table-bordered table-hover">
                    <thead>
                        <tr>
                            <th class="text-center">组</th>
                            <th class="text-center">名称</th>
                            <th class="text-center">级别</th>
                            <th class="text-center">报警途径</th>
                            <th class="text-center">接收用户</th>
                            <th class="text-center">操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        {% for i in lists %}
                            <tr>
                                <td class="text-center">{{ i.group }}</td>
                                <td class="text-center">{{ i.name }}</td>
                                <td class="text-center">{{ i.get_level_display }}</td>
                                <td class="text-center">{{ i.way }}</td>
                                <td class="text-center">{{ i.user.all|group_str2 }}</td>
                                <td class="text-center">
                                    <div class="btn-group" data-toggle="buttons">
                                      <a href="/alarm/alarmEdit/?id={{ i.id }}" class="btn btn-xs btn-success " data-toggle="modal">修改</a>
                                      <a href="/alarm/alarmDel/?id={{ i.id }}" class="btn btn-xs btn-danger" data-toggle="modal">删除</a>
                                    </div>
                                </td>
                            </tr>
                        {% endfor %}
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>

{% endblock content %}